import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import index from '@/view/index';
Vue.use(Router)

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },
    // {
    //   path: '/view/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },
    {
      path:'/',
      name:'index',
      title: '首页',
      component: index,
      children:[
        {
          path: '/',
          name: 'admin',
          title:'管理员',
          component: (resolve) => require(['@/view/home/admin'], resolve)
        },
        {
          path: '/home',
          name: 'home',
          title:'统计',
          component: (resolve) => require(['@/view/home/home'], resolve)
        }
      ]
    },
   
  ]
})
